home *** CD-ROM | disk | FTP | other *** search
- // EOJoin.h
- // Copyright (c) 1994, NeXT Computer, Inc. All rights reserved.
-
- #import <foundation/NSArray.h>
- #import <foundation/NSData.h>
- #import <foundation/NSDictionary.h>
- #import <foundation/NSObject.h>
- #import <foundation/NSString.h>
-
- @class EOEntity;
- @class EOAttribute;
-
-
- typedef enum {
- EOInnerJoin = 0, EOFullOuterJoin,
- EOLeftOuterJoin, EORightOuterJoin
- } EOJoinSemantic;
- // EOJoinSemantic specifies the manner in which a join should be made.
- // An inner join (also known as an equijoin) produces results only for
- // destinations of the join relationship that have non-null values. A
- // full outer join produces results for all source records, regardless of
- // the values of the relationships. A left outer join preserves rows in
- // the left (source) table (keeps them even if there's no corresponding
- // row in the right table), while a right outer join preserves rows in the
- // right (destination) table. Not all join semantics are supported by all
- // database servers.
-
-
- typedef enum {
- EOJoinEqualTo = 0, EOJoinNotEqualTo,
- EOJoinGreaterThan, EOJoinGreaterThanOrEqualTo,
- EOJoinLessThan, EOJoinLessThanOrEqualTo
- } EOJoinOperator;
- // EOJoinOperator defines the possible comparison method to use in
- // building a join. Attributes fitting the comparison are included in the
- // join; those not fitting are excluded.
-
-
- // An EOJoin describes one source/destination attribute pair for a
- // relationship. It holds the join semantic and the join operator for an
- // attribute pair.
-
-
- @interface EOJoin:NSObject
- {
- EOJoinSemantic _joinSemantic;
- EOJoinOperator _joinOperator;
- EOAttribute *_sourceAttribute;
- EOAttribute *_destinationAttribute;
- }
-
- - initWithSourceAttribute:(EOAttribute *)source
- destinationAttribute:(EOAttribute *)destination
- joinOperator:(EOJoinOperator)joinOperator
- joinSemantic:(EOJoinSemantic)joinSemantic;
- // Initializes a newly allocated EOJoin with the given information.
- // Returns self.
-
- - (EOJoinSemantic)joinSemantic;
- - (EOJoinOperator)joinOperator;
- - (EOAttribute *)sourceAttribute;
- - (EOAttribute *)destinationAttribute;
- // These methods return the information held by the EOJoin.
-
- @end
-
- @interface EOJoin(EOJoinEditing)
-
- - (void)setJoinOperator:(EOJoinOperator)jo;
- - (void)setJoinSemantic:(EOJoinSemantic)js;
- - (void)setDestinationAttribute:(EOAttribute *)attribute;
- - (void)setSourceAttribute:(EOAttribute *)attribute;
- // These methods set the information held by the EOJoin.
-
- @end
-